/*
 * SonarQube
 * Copyright (C) 2009-2017 SonarSource SA
 * mailto:info AT sonarsource DOT com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
@import (reference) "../mixins";
@import (reference) "../variables";

@workspace-height: 30px;
@workspace-padding: (@workspace-height - @formControlHeight) / 2;

.workspace-nav {
  position: fixed;
  z-index: @workspace-nav-z-index;
  bottom: 0;
  right: 0;
  height: @workspace-height;
}

.workspace-nav-list {
  float: right;
}

.workspace-nav-item {
  float: left;
  vertical-align: middle;
  margin-right: 10px;
  padding: @workspace-padding 10px;
  background-color: #404040;
  color: #fff;
  font-size: @smallFontSize;
  font-weight: 300;
  cursor: pointer;

  & > i {
    position: relative;
    top: -2px;
    vertical-align: middle;
  }
}

.workspace-viewer {
  position: fixed;
  z-index: @workspace-viewer-z-index;
  bottom: 0;
  left: 0;
  right: 0;
  box-sizing: border-box;
  background-color: #fff;
  box-shadow: 0 -6px 12px rgba(0, 0, 0, .175);
}

.workspace-viewer-header {
  @topPadding: (30px - @formControlHeight) / 2;
  position: relative;
  height: 30px;
  padding: @topPadding 10px;
  box-sizing: border-box;
  background-color: #404040;
  color: #fff;
  font-weight: 300;
}

.workspace-viewer-name {
  float: left;
  line-height: @formControlHeight;
  color: @white;
  font-weight: 300;

  i { margin-top: 3px; }
}

.workspace-viewer-resize {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 30px;
  height: 5px;
  margin-left: -15px;
  background-image: url();
  cursor: ns-resize;
}

.workspace-viewer-actions {
  float: right;
  line-height: @formControlHeight;

  a { color: inherit; }
}

.workspace-viewer-container {
  height: ~"calc(40vh - 30px)";
  min-height: 100px;
  max-height: ~"calc(95vh - 30px)";
  padding: 5px 10px;
  overflow-y: scroll;
  overflow-x: auto;
  box-sizing: border-box;
}


// Misc
.with-workspace .source-viewer {
  padding-bottom: 40vh;
}

.with-workspace .workspace-viewer .source-viewer {
  padding-bottom: 0
}
